package com.tizona.entity;

import com.tizona.entity.tarification.Accumulator;

import java.util.Date;

/**
 * Created by Vitaliy Kim.
 * Date: 11.09.2005
 * Time: 15:03:06
 */
public class SeAccum implements Accumulator {

    /** persistent field */
    private Long value;

    /** nullable persistent field */
    private Se se;

    /** nullable persistent field */
    private Date lastupdate;

    private boolean changed = false;

    /**
     * Constructor
     *
     * @param value
     */

    public SeAccum(Long value) {
        changed = true;
        this.value = value;
    }

    public SeAccum(Long value, Date lastupdate) {
        this.value = value;
        this.lastupdate = lastupdate;
    }

    public Date getLastupdate() {
        return lastupdate;
    }

    public void setLastupdate(Date lastupdate) {
        this.lastupdate = lastupdate;
    }



    public Long getValue() {
        return value;
    }

    public void setValue(Long value) {
        this.value = value;
    }

    public Se getSe() {
        return se;
    }

    public void setSe(Se se) {
        this.se = se;
    }

    public boolean isChanged() {
        return changed;
    }

    public void setChanged(boolean changed) {
        this.changed = changed;
    }

    public void add(long l) {
        this.value += l;
        changed = true;
    }

}
